﻿using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text.Json.Serialization;
using System.Text.Json;

namespace WaveringLand_Launcher.Model
{
    [PropertyChanged.AddINotifyPropertyChangedInterface]
    public class WAccount
    {
        public string Account { get; set; }

        public string Password { get; set; }

        [JsonConverter(typeof(JsonStringEnumConverter))]
        public AccountType AccountType { get; set; }

        public string ExtraCode { get; set; }
    }

    [PropertyChanged.AddINotifyPropertyChangedInterface]
    public class WllConfig
    {

        public ObservableCollection<WAccount> Accounts { get; set; }=new();

        public int SelectedAccount { get; set; }

        public string JavaPath { get; set; }

        public int MaxMemory { get; set; } = 2048;
    }

    public enum AccountType
    {
        Offline,
        Mojang,
        Microsoft
    }
}